# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=gnome-tweaks
pkgver=40.0
pkgrel=1
pkgdesc="Graphical interface for advanced GNOME 3 settings (Tweak Tool)"
url="https://wiki.gnome.org/Apps/Tweaks"
arch=(any)
license=(GPL)
depends=(gnome-settings-daemon python-gobject libhandy)
makedepends=(git meson)
groups=(gnome-extra)
provides=("gnome-tweak-tool=$pkgver")
conflicts=(gnome-tweak-tool)
replaces=(gnome-tweak-tool)
_commit=7a16849f498c8a57d525eb9184a8b0163e2ddcbb  # tags/40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-tweaks.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
